package paper.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;

import keter.domain.base.BaseEntity;

@Entity
public class Comments extends BaseEntity{
    //内容
    private String content;
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = decode(content);
    }
    
    @Column(name="ref_id")
    private Long refId;//前一条评论
	public Long getRefId() {
		return refId;
	}
	public void setRefId(Long refId) {
		this.refId = refId;
	}
    
    
    private Long mainId;//评论主体（课题、报告、论文等）主键

    @Column(name="main_id")
    public Long getMainId() {
		return mainId;
	}
	public void setMainId(Long mainId) {
		this.mainId = mainId;
	}
	
	@NotNull
	private Long creatorId;
	@Column(name="creator_id")
	public Long getCreatorId() {
		return creatorId;
	}
	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}
}
